Optimal. Leaf size=278 \[ -\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}+\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}+1\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2 \tan (e+f x)+a^2\right )}-\frac {\sqrt {d} \log \left (\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{4 \sqrt {2} a^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 278, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 14, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.560, Rules used = {3568, 3653, 12, 3476, 329, 211, 1165, 628, 1162, 617, 204, 3634, 63, 205} \[ -\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}+\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}+1\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2 \tan (e+f x)+a^2\right )}-\frac {\sqrt {d} \log \left (\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{4 \sqrt {2} a^2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 63
Rule 204
Rule 205
Rule 211
Rule 329
Rule 617
Rule 628
Rule 1162
Rule 1165
Rule 3476
Rule 3568
Rule 3634
Rule 3653
Rubi steps
\begin {align*} \int \frac {\sqrt {d \tan (e+f x)}}{(a+a \tan (e+f x))^2} \, dx &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\int \frac {-\frac {a d}{2}-a d \tan (e+f x)+\frac {1}{2} a d \tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{2 a^2}\\ &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\int -\frac {2 a^2 d}{\sqrt {d \tan (e+f x)}} \, dx}{4 a^4}-\frac {d \int \frac {1+\tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{4 a}\\ &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {d \int \frac {1}{\sqrt {d \tan (e+f x)}} \, dx}{2 a^2}-\frac {d \operatorname {Subst}\left (\int \frac {1}{\sqrt {d x} (a+a x)} \, dx,x,\tan (e+f x)\right )}{4 a f}\\ &=-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\operatorname {Subst}\left (\int \frac {1}{a+\frac {a x^2}{d}} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{2 a f}+\frac {d^2 \operatorname {Subst}\left (\int \frac {1}{\sqrt {x} \left (d^2+x^2\right )} \, dx,x,d \tan (e+f x)\right )}{2 a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {d^2 \operatorname {Subst}\left (\int \frac {1}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {d \operatorname {Subst}\left (\int \frac {d-x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{2 a^2 f}+\frac {d \operatorname {Subst}\left (\int \frac {d+x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{2 a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}-\frac {\sqrt {d} \operatorname {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}+2 x}{-d-\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d} \operatorname {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}-2 x}{-d+\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {d \operatorname {Subst}\left (\int \frac {1}{d-\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 a^2 f}+\frac {d \operatorname {Subst}\left (\int \frac {1}{d+\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{4 a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}+\frac {\sqrt {d} \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d} \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}\\ &=-\frac {\sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 a^2 f}-\frac {\sqrt {d} \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}+\frac {\sqrt {d} \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{2 \sqrt {2} a^2 f}-\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}+\frac {\sqrt {d} \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{4 \sqrt {2} a^2 f}-\frac {\sqrt {d \tan (e+f x)}}{2 f \left (a^2+a^2 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.38, size = 192, normalized size = 0.69 \[ \frac {\sqrt {d \tan (e+f x)} \left (-\frac {2 \sqrt {2} \tan ^{-1}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right )-2 \sqrt {2} \tan ^{-1}\left (\sqrt {2} \sqrt {\tan (e+f x)}+1\right )+4 \tan ^{-1}\left (\sqrt {\tan (e+f x)}\right )+\sqrt {2} \log \left (-\tan (e+f x)+\sqrt {2} \sqrt {\tan (e+f x)}-1\right )-\sqrt {2} \log \left (\tan (e+f x)+\sqrt {2} \sqrt {\tan (e+f x)}+1\right )}{2 \sqrt {\tan (e+f x)}}-\frac {2 \cos (e+f x)}{\sin (e+f x)+\cos (e+f x)}\right )}{4 a^2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.98, size = 1662, normalized size = 5.98 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.20, size = 260, normalized size = 0.94 \[ \frac {\frac {2 \, \sqrt {2} d \sqrt {{\left | d \right |}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{a^{2} f} + \frac {2 \, \sqrt {2} d \sqrt {{\left | d \right |}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{a^{2} f} + \frac {\sqrt {2} d \sqrt {{\left | d \right |}} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{a^{2} f} - \frac {\sqrt {2} d \sqrt {{\left | d \right |}} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{a^{2} f} - \frac {4 \, d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a^{2} f} - \frac {4 \, \sqrt {d \tan \left (f x + e\right )} d^{2}}{{\left (d \tan \left (f x + e\right ) + d\right )} a^{2} f}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.29, size = 223, normalized size = 0.80 \[ -\frac {d \sqrt {d \tan \left (f x +e \right )}}{2 f \,a^{2} \left (d \tan \left (f x +e \right )+d \right )}-\frac {\arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right ) \sqrt {d}}{2 a^{2} f}+\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )}{8 f \,a^{2}}+\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )}{4 f \,a^{2}}-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )}{4 f \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.62, size = 218, normalized size = 0.78 \[ -\frac {\frac {4 \, \sqrt {d \tan \left (f x + e\right )} d^{2}}{a^{2} d \tan \left (f x + e\right ) + a^{2} d} + \frac {4 \, d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a^{2}} - \frac {2 \, \sqrt {2} d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right ) + 2 \, \sqrt {2} d^{\frac {3}{2}} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right ) + \sqrt {2} d^{\frac {3}{2}} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right ) - \sqrt {2} d^{\frac {3}{2}} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{a^{2}}}{8 \, d f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.58, size = 367, normalized size = 1.32 \[ -\frac {\mathrm {atan}\left (\frac {4\,d^{12}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{a^8\,f^4}\right )}^{1/4}}{\frac {4\,d^{13}}{a^2\,f}-4\,a^2\,d^{12}\,f\,\sqrt {-\frac {d^2}{a^8\,f^4}}}+\frac {4\,d^{11}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{a^8\,f^4}\right )}^{3/4}}{\frac {4\,d^{13}}{a^6\,f^3}-\frac {4\,d^{12}\,\sqrt {-\frac {d^2}{a^8\,f^4}}}{a^2\,f}}\right )\,{\left (-\frac {d^2}{a^8\,f^4}\right )}^{1/4}}{2}-\mathrm {atan}\left (\frac {d^{12}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{256\,a^8\,f^4}\right )}^{1/4}\,16{}\mathrm {i}}{\frac {4\,d^{13}}{a^2\,f}+64\,a^2\,d^{12}\,f\,\sqrt {-\frac {d^2}{256\,a^8\,f^4}}}-\frac {d^{11}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,{\left (-\frac {d^2}{256\,a^8\,f^4}\right )}^{3/4}\,256{}\mathrm {i}}{\frac {4\,d^{13}}{a^6\,f^3}+\frac {64\,d^{12}\,\sqrt {-\frac {d^2}{256\,a^8\,f^4}}}{a^2\,f}}\right )\,{\left (-\frac {d^2}{256\,a^8\,f^4}\right )}^{1/4}\,2{}\mathrm {i}-\frac {d\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\left (a^2\,d\,f+a^2\,d\,f\,\mathrm {tan}\left (e+f\,x\right )\right )}+\frac {\sqrt {-d}\,\mathrm {atan}\left (\frac {\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{\sqrt {-d}}\right )\,1{}\mathrm {i}}{2\,a^2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sqrt {d \tan {\left (e + f x \right )}}}{\tan ^{2}{\left (e + f x \right )} + 2 \tan {\left (e + f x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________